package com.zeus.util;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngineConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by Administrator on 2015/8/30.
 */
public class ActivitiUtil {
    public static ProcessEngine getProcessEngine(){
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("activiti.cfg.xml");
        ProcessEngineConfiguration processEngineConfiguration = applicationContext.getBean(ProcessEngineConfiguration.class);
        return  processEngineConfiguration.buildProcessEngine();
    }
}
